package cn.ywang.pattern.strategy;

/**
 * 出行类
 *
 * @author BeatificWang
 * @date 2019/3/15 23:11
 */
public class Trip {
	private double distance;

	public Trip(double distance) {
		this.distance = distance;
	}

	public void trip(String tripStrategy) {
		TripStrategyFactory.getTripStrategy(tripStrategy).doTrip(this.distance);
	}
}
